package com.bcinfo.iccard.model;

import java.sql.Timestamp;

public class RechargeableCardCancelDetail
{
    private String    rechargeableCardNum;
    private Long      userId;
    private Timestamp opdate;

    private String    opName;

    private Short     status;

    private Long      rechargeSum;

    private Long      cancelSum;

    private Long      ratio;

    public Timestamp getOpdate()
    {
        return opdate;
    }

    public void setOpdate(Timestamp opdate)
    {
        this.opdate = opdate;
    }

    public String getOpName()
    {
        return opName;
    }

    public void setOpName(String opName)
    {
        this.opName = opName;
    }

    public Short getStatus()
    {
        return status;
    }

    public void setStatus(Short status)
    {
        this.status = status;
    }

    public Long getRechargeSum()
    {
        return rechargeSum;
    }

    public void setRechargeSum(Long rechargeSum)
    {
        this.rechargeSum = rechargeSum;
    }

    public Long getCancelSum()
    {
        return cancelSum;
    }

    public void setCancelSum(Long cancelSum)
    {
        this.cancelSum = -cancelSum;
    }

    public Long getRatio()
    {
        return (long) ((rechargeSum - cancelSum) / 1000.00);
    }

    public String getRechargeableCardNum()
    {
        return rechargeableCardNum;
    }

    public void setRechargeableCardNum(String rechargeableCardNum)
    {
        this.rechargeableCardNum = rechargeableCardNum;
    }

    public Long getUserId()
    {
        return userId;
    }

    public void setUserId(Long userId)
    {
        this.userId = userId;
    }

    @Override
    public String toString()
    {
        return "RechargeableCardCancelDetail [rechargeableCardNum=" + rechargeableCardNum + ", userId=" + userId
                + ", opdate=" + opdate + ", opName=" + opName + ", status=" + status + ", rechargeSum=" + rechargeSum
                + ", cancelSum=" + cancelSum + ", ratio=" + ratio + "]";
    }

}